package com.yc154.biz;

import com.yc154.vo.DacuOrder;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
public class OrderBiz {

    // 创建大促订单
    @RabbitListener(queuesToDeclare = @Queue("dacu-order"))
    public void createOrder(DacuOrder order) {
        System.out.println("order = " + order);
        // 1. 创建订单记录 orders
        // 2. 创建订单明细 orderitem
        // 3. TODO 发送短信(邮件)给用户
        // 4. TODO 记账 ....
    }
}
